import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function monitorApi() {
	return {
		server() {
			return request({
				url: '/monitor/server',
				method: 'get',
			});
		},
		cache() {
			return request({
				url: '/monitor/cache',
				method: 'get',
			});
		},
		cacheList() {
			return request({
				url: '/monitor/cache/list',
				method: 'get',
			});
		},
		onlinePage(data:any) {
            return request({
                url: '/monitor/online/list',
                method: 'get',
                params:data
            })
        },
		forceLogout(token:string) {
			return request({
				url: '/monitor/online/' + token,
				method: 'post',
			});
		},
	};
}
